a=[0,0.5,2,4]; da=diff(a)